program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  a1, b1, q1, a2, b2, q2, c: Comp;

begin
  try
    readln(a1, b1, q1, a2, b2, q2);
    writeln(c);
    readln;
    { TODO -oUser -cConsole Main : Insert code here }
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.
